<template>
  <div class="headerBack">
    <mu-button flat class="backBarClass mu-ripple-wrapper" @click="onClose()">
      <mu-icon size="36" value="chevron_left" left></mu-icon>
    </mu-button>
  </div>
</template>

<script>
  export default {
    name: 'headerBack',
    methods: {
      onClose() {
        if (window.history.length > 1) {
          this.$router.go(-1);
        } else {
          this.$router.push({name: 'home'})
        }
      }
    }
  }
</script>
<style lang="scss">
  .backBarClass {
    width: 5rem;
  }
</style>
